<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>excel导入</title>
    <link rel="stylesheet" href="./layui/css/layui.css">
</head>
<body>
<script src="./layui/layui.js"></script>
<div class="layui-container">
    <h1>测试</h1>
    <button type="button" class="layui-btn" id="test1">
        <i class="layui-icon">&#xe67c;</i>上传文件
    </button>
</div>
<script>
    layui.use('upload', function(){
        var upload = layui.upload;

        //执行实例
        var uploadInst = upload.render({
            elem: '#test1' //绑定元素
            ,url: '/video/importExcel', //上传接口
            accept:'file'
            ,done: function(res){
                //上传完毕回调
                console.log("成功")
            }
            ,error: function(){
                //请求异常回调
                console.log("失敗")
            }
        });
    });
</script>
</body>
</html>